package org.hamster.common.aggrid.model;

import java.util.List;

/**
 * Model representing the response to ag-Grid for infinite scrolling
 */
public class GetRowsResponse {
    private List<?> rowsThisBlock;
    private int rowCount;
    private boolean lastRow;

    public GetRowsResponse() {
    }

    public GetRowsResponse(List<?> rowsThisBlock, int rowCount, boolean lastRow) {
        this.rowsThisBlock = rowsThisBlock;
        this.rowCount = rowCount;
        this.lastRow = lastRow;
    }

    public List<?> getRowsThisBlock() {
        return rowsThisBlock;
    }

    public void setRowsThisBlock(List<?> rowsThisBlock) {
        this.rowsThisBlock = rowsThisBlock;
    }

    public int getRowCount() {
        return rowCount;
    }

    public void setRowCount(int rowCount) {
        this.rowCount = rowCount;
    }

    public boolean isLastRow() {
        return lastRow;
    }

    public void setLastRow(boolean lastRow) {
        this.lastRow = lastRow;
    }

    @Override
    public String toString() {
        return "GetRowsResponse{" +
                "rowsThisBlock=" + rowsThisBlock +
                ", rowCount=" + rowCount +
                ", lastRow=" + lastRow +
                '}';
    }
}